package com.yjj.demo.thread.web;

import com.yjj.demo.thread.service.NotifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 *
 * @author yangjiajia
 * @time 2021/8/22 20:14
 */
@RestController
public class NotifyController {

    @Autowired
    private NotifyService notifyService;

    @GetMapping("/send")
    public String send(String msg) {
        notifyService.send(msg);
        return "success";
    }

    @GetMapping("send1")
    public void send1() {
        notifyService.send();
    }
}
